package com.jic.veteran.portal.dao;

import com.jic.veteran.portal.domain.DonatePayDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DonatePayDetailDao {
    int insert(@Param("item") DonatePayDetail donatePayDetail);
    int update(@Param("item") DonatePayDetail donatePayDetail);
    List<DonatePayDetail> getItemByTrxidByStatus(@Param("trxid") String trxid,@Param("payStatus") String payStatus);
    DonatePayDetail getItemByReqsn(@Param("reqsn") String reqsn);
    List<DonatePayDetail> getSumTrxamtByOpenId(@Param("openid") String openid);
    String getPersonTotalProject(@Param("openid") String openid);
    String getPersonTotalDonateAmout(@Param("openid") String openid);

  /**
   * 根据用户和项目id,获取证书信息.
   *
   * @param openId 用户id
   * @param projectId 项目id
   * @return 捐助汇总
   */
  DonatePayDetail getCertificate(String openId, String projectId);

    String getProjectThanks(@Param("projectId") String projectId);
}
